package abstractfactory.factory.impl;

import abstractfactory.factory.Factory;
import abstractfactory.item.suit.Suit;
import abstractfactory.item.suit.impl.Clothes;
import abstractfactory.item.suit.impl.Shoes;
import abstractfactory.item.suit.impl.Trousers;

public class SuitFactory extends Factory {
    public Suit getSuit(String suit) {
        if(suit == null){
            return null;
        }
        if(suit.equalsIgnoreCase("clothes")){
            return new Clothes();
        } else if(suit.equalsIgnoreCase("trousers")){
            return new Trousers();
        } else if(suit.equalsIgnoreCase("shoes")){
            return new Shoes();
        }
        return null;
    }
}
